<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">

<ui:composition template="./headerView.xhtml">
	<ui:define name="content">
		
		<table width="100%" >
			<td rowspan="1" colspan="1">
				<div class="content" align="center">
					<h1>Welcome</h1>
					<h:form>
					<h:commandButton image="#{resource['images:splash.gif']}" height="355" width="350" align="middle" border="0" 
						actionListener="#{pets.categoryMap}" action ="#{pets.listPets}" immediate="true"/>
					</h:form>
				</div>
			</td>
		</table>
		
		 <h:form rendered="#{customerLogin.dataCustomer.administrator}">
		 <font face="geneva,verdana,arial" size="2">
				<table >
					<tr>
						<td align="right" ><b>Customer NIF:</b></td>
						<td align="right"><input type="text" maxlength="9" name="idCustomer" size="10"  style="text-align:right" /> 
						&nbsp;<h:commandButton value="Total Amount" immediate="true" action="#{totalAmount.ListTotalAmountOrders}" style=" width : 105px">
							<f:param name="idCustomer" value="idCustomer"></f:param>
							<f:param name="list" value="false"></f:param>
						</h:commandButton>
						<h:commandButton value="Total Orders" immediate="true" action="#{totalOrders.ListTotalOrders}" style=" width : 105px">
							<f:param name="idCustomer" value="idCustomer"></f:param>
							<f:param name="list" value="false"></f:param>
						</h:commandButton>
						</td> 
					</tr>
				</table>
				<table>
				<tr>
					<td align="right"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Order Id:</b></td>
					<td align="left"><input type="text"  maxlength="9" name="idOrder" size="10"  style="text-align:right" /> 
						&nbsp;<h:commandButton value="Order by id" immediate="true" action="#{findorder.ListOrder}" style=" width : 105px">
							<f:param name="idOrder" value="idOrder"></f:param>
						</h:commandButton>
						
					</td>
				</tr>
			</table>
			<br></br>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h:commandButton align="left" value="List All Orders" immediate="true" renderer="#customer.administrator" action="#{listOrders.ListOrders}" style=" width : 106px;">
						</h:commandButton>
<br></br>
<br></br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h:commandButton  action="ClientListView.html" value="List All Clients"/>		
		</font>
			</h:form>
			
		</ui:define>
</ui:composition>
</html>